/*++

Copyright (c) Microsoft Corporation. 
 
This source code is subject to terms and conditions of the Microsoft
Public License. A copy of the license can be found in the License.txt
file at the root of this distribution. By using this source code in 
any fashion, you are agreeing to be bound by the terms of the Microsoft
Public License.
 
You must not remove this notice, or any other, from this software.

Module Name:

    Internal.h

Abstract:

    This module contains the local type definitions for the Generic serial
    driver sample.

--*/

#pragma once

#include <windows.h>
#include <atlbase.h>
#include <atlcom.h>
#include <atlstr.h>

__user_driver;  // Macro letting the compiler know this is not a kernel driver (this will help surpress needless warnings)

// Common WPD and WUDF headers
#include <devioctl.h>
#include <initguid.h>
#include <propkeydef.h>
#include <propvarutil.h>
#include "PortableDeviceTypes.h"
#include "PortableDeviceClassExtension.h"
#include "PortableDevice.h"

// Headers for Sensor specific defines and WpdCommands
#include "Sensors.h"
#include <SensorsClassExtension.h>

// One forward-declare that pretty much everyone is going to need to know about
class CMyDevice;

///////////////////////////////////////////////////////////////////
// Common macro expansions that are used throughout the project
#define SAFE_RELEASE(p)     {if ((p)) { (p)->Release(); (p) = NULL; }}
#define ARRAY_SIZE(x)       (sizeof(x) / sizeof(x[0]))


///////////////////////////////////////////////////////////////////
// TRACING SUPPORT
//
// Define the tracing flags.
// Choose a different trace control GUID
//
// Tracing Information
#define MYDRIVER_TRACING_ID L"Microsoft\\Sensor\\GenericSerialDriver"

//
// Define the tracing flags.
//
// Choose a different trace control GUID
//

#define WPP_CONTROL_GUIDS \
		WPP_DEFINE_CONTROL_GUID( GenericSerialDriverTraceControl, (A3010913,9B71,4e8f,8D05,4FC802FC5BB6), \
		WPP_DEFINE_BIT(TRACE_FLAG_RS232) \
        WPP_DEFINE_BIT(MYDRIVER_ALL_INFO))

#define WPP_FLAG_LEVEL_LOGGER(flag, level)      WPP_LEVEL_LOGGER(flag)

#define WPP_FLAG_LEVEL_ENABLED(flag, level)    ( WPP_LEVEL_ENABLED(flag) && \
                                                 WPP_CONTROL(WPP_BIT_ ## flag).Level >= level )

//
// This comment block is scanned by the trace preprocessor to define our
// Trace function.
//
// begin_wpp config
// FUNC Trace{FLAG=MYDRIVER_ALL_INFO}(LEVEL, MSG, ...);
// end_wpp
//


